#encode 默认utf-8,一个汉字占3个字节
#GBK 一个汉字占2个字节

s='谢卓宇'
s1=s.encode('utf-8',errors='ignore')
print(s1)
a=s1.decode('utf-8',errors='ignore')
print(a)

s2='谢卓宇'
s3=s2.encode('GBK',errors='strict')
print(s3)

s2='谢卓宇'
s3=s2.encode('GBK',errors='replace')
print(s3)